package com.maoxs.service;

import com.maoxs.pojo.QuartzEntity;

import java.util.List;

public interface JobService {
    /**
     * 新增一个任务
     *
     * @param quartz
     * @return
     * @throws Exception
     */
    String save(QuartzEntity quartz) throws Exception;

    /**
     * 任务列表
     *
     * @return
     */
    List<QuartzEntity> list() throws Exception;

    /**
     * 触发任务
     *
     * @param quartz
     * @return
     */
    String trigger(QuartzEntity quartz) throws Exception;

    /**
     * 停止任务
     *
     * @param quartz
     * @return
     */
    String pause(QuartzEntity quartz) throws Exception;

    /**
     * 恢复任务
     *
     * @param quartz
     * @return
     */
    String resume(QuartzEntity quartz) throws Exception;

    /**
     * 移除任务
     *
     * @param quartz
     * @return
     */
    String remove(QuartzEntity quartz) throws Exception;

}
